Fix number of generated SIFT features #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While playing around with the SIFT feature extractor, I observed the following problems:
When creating the keypoint list, the flag
bHasMax
is defined the wrong way which would lead to unexpected behaviour in no limit is set. If there is a limit, then too many features are copied, but this is handled implicitly later on making this hard to recognize.I observed that in many cases the number of extracted features (at least what is returned by
GetFeatureNum()
) exceed the specified limit. The functionLimitFeatureCount()
removes overflowing levels iteratively until the count would drop below the limit in the next iteration. This is fixed by partially removing this last contributing level to match the limit.Although the feature extraction limit can be controlled in the config file, the Bundler uses a hard-coded number of
150
. Since the value in the config file is1024
, the above errors were unfortunately not catched. The second commit adjusts the config file and removes the hard-coded value.